//
//  ZYLSearchTypeCollectionViewCell.m
//  Cartoon
//
//  Created by dllo on 15/7/14.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "ZYLSearchTypeCollectionViewCell.h"

@implementation ZYLSearchTypeCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.typeLabel = [[[UILabel alloc] init] autorelease];
        [self.contentView addSubview:self.typeLabel];
    }
    return self;
}
- (void)setLabelText:(NSString *)labelText
{
    if (_labelText != labelText) {
        [_labelText release];
        _labelText = [labelText retain];
    }
    self.typeLabel.text = labelText;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.typeLabel.frame = CGRectMake(0, 0, layoutAttributes.size.width, layoutAttributes.size.height);
    self.typeLabel.font = [UIFont systemFontOfSize:15];
    self.typeLabel.layer.borderWidth = 1;
    self.typeLabel.textAlignment = NSTextAlignmentCenter;
    self.typeLabel.layer.cornerRadius = 5;
    self.typeLabel.textColor = [UIColor orangeColor];
    self.typeLabel.layer.borderColor = [[UIColor orangeColor] CGColor];
}

@end
